Type inference with simple subtypes
نویسندگان
چکیده
منابع مشابه
Type Inference With Simple Subtypes
ion clause, we use A -{x:σ} to denote the set difference, i.e., the type assignment defined by removing x:σ from A. G(x) = { s⊆t }, {x:s} ⊃ x:t G(MN) = let C1, A1 ⊃ M:σ = G(M) C2, A2 ⊃ N:τ = G(N), with type variables renamed to be disjoint from those in G(M) S = UNIFY({α=β | x:α∈A1 and x:β∈A2} ∪ {σ=τ→t}) where t is a fresh type variable in SC1∪SC2∪{St⊆u}, SA1∪SA2 ⊃ MN:u where u is a fresh type ...
متن کاملSimple Type Inference for Structural Polymorphism
We propose a new way to mix constrained types and type inference, where the interaction between the two is minimal. By using local constraints embedded in types, rather than the other way round, we obtain a system which keeps the usual structure of an Hindley-Milner type system. In practice, this means that it is easy to introduce local constraints in existing type inference algorithms. Eventho...
متن کاملType Inference with Simple Selftypes is NP-complete
The metavariable self is fundamental in object-oriented languages. Typing self in the presence of inheritance has been studied by Abadi and Cardelli, Bruce, and others. A key concept in these developments is the notion of selftype, which enables flexible type annotations that are impossible with recursive types and subtyping. Bruce et al. demonstrated that, for the language TOOPLE, type checkin...
متن کاملSimple Type Inference for Structural Polymorphismy
We propose a new way to mix onstrained types and type inferen e, where the intera tion between the two is minimal. By using lo al onstraints embedded in types, rather than the other way round, we obtain a system whi h keeps the usual stru ture of an Hindley-Milner type system. In pra ti e, this means that it is easy to introdu e lo al onstraints in existing type inferen e algorithms. Eventhough...
متن کاملSimple Subtypes for Specification
Type systems have been studied extensively for programs, but not for specifications. is paper presents a type system for the increasingly important class of specification languages based on first-order constraints over relational data models, which have applications in software modelling, architectural description, web ontologies, access control, etc. e system has rather a different flavour f...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Journal of Functional Programming
سال: 1991
ISSN: 0956-7968,1469-7653
DOI: 10.1017/s0956796800000113